#ifndef LAGRANGE_H
#define LAGRANGE_H

#include "../../utils/MatrixUtils.h"

namespace NumericalAnalysis
{
    // Calculates the Lagrange polynomial Pi(x)
    double CalculateLagrangePolynomial(const Utils::Matriz& pairs, const double x, const uint32_t i);

    // Returns the pairs of (xi, Pn(xi)), where Pn 
    // is the Lagrange polynomial of interpolation.
    Utils::Matriz LagrangeInterpolation(const std::string& pairsFilePath, const uint32_t n, 
                                        const std::string& valuesFilePath, const uint32_t m);
}

#endif // LAGRANGE_H
